package com.meixiang.activity.homes.financial;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.meixiang.R;
import com.meixiang.activity.account.myMoneyManagement.MyMoneyManagementActivity;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.CircularProgressBar;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author yinsujun  Created at 2016/5/3 16:55
 *         美金融
 */
public class FinancialActivity extends BaseActivity {
    @Bind(R.id.financial_tv_portion)
    TextView tvPortion;
    @Bind(R.id.financial_bt_investment)
    Button btInvestment;
    @Bind(R.id.financial_progress_two)
    CircularProgressBar progress;
    @Bind(R.id.financial_progress_one)
    CircularProgressBar progressOne;
    @Bind(R.id.financial_progress_three)
    CircularProgressBar progressThree;
    @Bind(R.id.financial_tv_look_more)
    TextView tvMore ;
    private int progressBackground, outerProgressBackground;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_financial);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        setTitle("美金融");

    }

    @Override
    protected void initView() {
        progressBackground = ContextCompat.getColor(context, R.color.white);
        outerProgressBackground = ContextCompat.getColor(context, R.color.financial_transparent_color);
        //中心圆背景色
        progress.setProgressColor(progressBackground);
        //外圈背景色
        progress.setProgressBackgroundColor(outerProgressBackground);

        progressOne.setProgressColor(progressBackground);
        progressOne.setProgressBackgroundColor(outerProgressBackground);
        progressThree.setProgressColor(progressBackground);
        progressThree.setProgressBackgroundColor(outerProgressBackground);
    }

    @Override
    protected void setData() {

    }

    @OnClick({R.id.financial_bt_investment,R.id.financial_tv_look_more})
    void click(View v) {
        if (v.equals(btInvestment)) {
            startActivity(new Intent(context, ConfirmInvestmentActivity.class));
        }
        if(v.equals(tvMore)){
            startActivity(new Intent(context, MyMoneyManagementActivity.class));
        }

    }

    @Override
    public void onClick(View v) {

    }
}
